package org.example.flinktest.bean;
import java.io.Serializable;

/**
 * @author shihb
 * @date 2019/12/10 11:14
 */
public class SensorReading  implements Serializable {
  private String id;
  private Long timestamp;
  private Double temperature;

  /**
   * 注意javabean一定要默认的构造方法没有这个构造方法不会编译成POJO
   */
  public SensorReading() {
  }

  public SensorReading(String id, long timestamp, double temperature) {
    this.id = id;
    this.timestamp = timestamp;
    this.temperature = temperature;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public Long getTimestamp() {
    return timestamp;
  }

  public void setTimestamp(Long timestamp) {
    this.timestamp = timestamp;
  }

  public Double getTemperature() {
    return temperature;
  }

  public void setTemperature(Double temperature) {
    this.temperature = temperature;
  }

  @Override
  public String toString() {
    return "SensorReading{id="+id+",timestamp="+timestamp+",temperature="+temperature+"}";
  }
}
